import 'dart:io';

import 'package:flustars/flustars.dart';

class DirectoryUtils {
  /// 初始化目录
  static void getInstance() {
    DirectoryUtil.getInstance();
  }

  /// 创建createTempDir
  static Directory createTempDir(String category) {
    return DirectoryUtil.createTempDirSync(category: category);
  }

  /// 创建createAppDocDir
  static Directory createAppDocDir(String category) {
    return DirectoryUtil.createAppDocDirSync(category: category);
  }

  /// 创建createStorageDir
  static Directory createStorageDir(String category) {
    return DirectoryUtil.createStorageDirSync(category: category);
  }

  /// 创建createDir
  static Directory createDir(String path) {
    return DirectoryUtil.createDirSync(path);
  }

  /// 获取getAppDocPath
  static String getAppDocPath(String category, String fileName, String format) {
    return DirectoryUtil.getAppDocPath(
        category: category, fileName: fileName, format: format);
  }

  /// 获取getTempPath
  static String getTempPath(String category, String fileName, String format) {
    return DirectoryUtil.getTempPath(
        category: category, fileName: fileName, format: format);
  }

  /// 获取getAppSupportPath
  static String getAppSupportPath(
      String category, String fileName, String format) {
    return DirectoryUtil.getAppSupportPath(
        category: category, fileName: fileName, format: format);
  }

  /// 获取getStoragePath
  static String getStoragePath(
      String category, String fileName, String format) {
    return DirectoryUtil.getStoragePath(
        category: category, fileName: fileName, format: format);
  }
}
/**
  await DirectoryUtil.getInstance();
  String tempPath = DirectoryUtil.getTempPath(category: 'Pictures', fileName: 'demo', format: 'png');
  print("thll  tempPath: $tempPath");
  String appDocPath = DirectoryUtil.getAppDocPath(category: 'Pictures', fileName: 'demo', format: 'png');
  print("thll  appDocPath: $appDocPath");

  String appSupportPath = DirectoryUtil.getAppSupportPath(category: 'Pictures', fileName: 'demo', format: 'png');
  print("thll  appSupportPath: $appSupportPath");
  String storagePath = DirectoryUtil.getStoragePath(category: 'Pictures', fileName: 'demo', format: 'png');
  print("thll  storagePath: $storagePath");
 */
